home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource for Source: C/C++
/
Resource for Source - C-C++.iso
/
codelib8
/
v_10_10
/
1010024b
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1995-11-01
|
294 b
|
17 lines
#include <stdio.h>
#define MAXLINE 80
main()
{
int n;
char c, buf[MAXLINE+1];
while (gets(buf))
if (sscanf(buf,"%d , %c",&n, &c) == 2)
printf("%d, %c\n",n,c);
else
printf("Invalid input: \"%s\"\n",buf);
return 0;
}